import { ref } from "vue";

let colors = {
    red: "#be4b15",
    green: "#52ce60",
    blue: "#6ea5f8",
    lightred: "#fd8852",
    lightblue: "#afd4fe",
    lightgreen: "#b9e986",
    pink: "#faadc1",
    purple: "#d689ff",
    orange: "#fdb400",
};

const systemFields=[
    {
        fieldCnName: "CreateTime",
        nodeType: "Node",
        fieldZhName: "创建时间",
        fieldIndexes: "",
        iskey: false,
        figure: "Hexagon",
        color: colors.blue,
        isSystemField:true
    },
    {
        fieldCnName: "UpdateTime",
        nodeType: "Node",
        fieldZhName: "更新时间",
        fieldIndexes: "",
        iskey: false,
        figure: "Hexagon",
        color: colors.blue,
        isSystemField:true
    },
]

export let tableSet = ref([
    {
        key: "Products",
        nodeType: "Node",
        fieldZhName: "商品",
        items: [
            {
                fieldCnName: "ProductID",
                nodeType: "Node",
                fieldZhName: "商品ID",
                fieldIndexes: "",
                iskey: true,
                figure: "Decision",
                color: colors.red,
            },
            {
                fieldCnName: "ProductName",
                nodeType: "Node",
                fieldZhName: "商品名字",
                fieldIndexes: "",
                iskey: false,
                figure: "Hexagon",
                color: colors.blue,
            },
            {
                fieldCnName: "SupplierID",
                nodeType: "Node",
                fieldZhName: "供应商ID",
                fieldIndexes: "Suppliers.SupplierID",
                iskey: false,
                figure: "Decision",
                color: "purple",
            },
            {
                fieldCnName: "CategoryID",
                nodeType: "Node",
                fieldZhName: "类别ID",
                fieldIndexes: "Categories.CategoryID",
                iskey: false,
                figure: "Decision",
                color: "purple",
            },
            ...systemFields
        ],
    },
]);

